package di_step3;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;



public class HelloApp {
	public static void main(String[] args) {

		Resource rs = new ClassPathResource("di_step3/beans.xml");
		BeanFactory factory = new XmlBeanFactory(rs);

			/*BeanFactory factory = new XmlBeanFactory(new FileSystemResource("./src/di_step3/beans.xml"));*/

			MessageBean bean = factory.getBean("MessageBean", MessageBean.class);
			bean.sayHello("lol");
	}
}
